using System;
using System.Web.UI.WebControls;
using NCS.Library;
using NCS.Library.Components.Portal;
using NCS.Library.Components.Security;
using NCS.Library.Components.Tabs;
using NCS.Library.Utilities;
using NCS.Module.CMS.Library.Definitions;
using NCS.Module.CMS.Library.Zones;

namespace NCS.Module.CMS.Admin
{
	public partial class CMSSetting : AuthenticatedControl
	{
		protected void Page_Load(object sender, EventArgs e)
		{
            int portalid = ConvertUtility.ToInt32(AppEnv.PortalId());
           
		    int ptt = ConvertUtility.ToInt32(Portal[Constants.CMS_PortalTT + AppEnv.GetLanguage()]);
		    int pmv = ConvertUtility.ToInt32(Portal[Constants.CMS_PortalMovies + AppEnv.GetLanguage()]);
		    int ptc = ConvertUtility.ToInt32(Portal[Constants.CMS_PortalTC + AppEnv.GetLanguage()]);
            int psp = ConvertUtility.ToInt32(Portal[Constants.CMS_PortalSP + AppEnv.GetLanguage()]);
		    
               if(portalid == ptt)
               {
                   PlaceHolder1.Controls.Add(LoadControl("/Modules/CMS/Admin/TTSetting.ascx"));
               }
               else if(portalid == pmv)
               {
                   PlaceHolder1.Controls.Add(LoadControl("/Modules/CMS/Admin/MVSettings.ascx"));
               }
               else if (portalid == ptc)
               {
                   PlaceHolder1.Controls.Add(LoadControl("/Modules/CMS/Admin/TCSettings.ascx"));
               }
               else// if (portalid == psp)
               {
                   PlaceHolder1.Controls.Add(LoadControl("/Modules/CMS/Admin/SPSettings.ascx"));
               }
			
		}
	}
}